<template>
    <material-preview>
        <div class="product-desc material-news-item-type2">
            <div class="small m-t-xs">
                <p>状态:@{{ item1.media_id ? '已上传' : '未上传' }}</p>
                <p>所属分类：@{{ item1.category ? item1.category : '未定义' }}</p>
                <p>素材类型：@{{ item1.is_forever ? '永久素材' : '临时素材' }}</p>
                <p v-show="item1.push_time">最后推送时间：@{{ item1.push_time }}</p>
                <p v-show="item1.push_result" style="color: red;">推送结果：@{{ item1.push_result }}</p>
                <p>最后更新时间：@{{ item1.updated_at }}</p>
            </div>
            <div class="m-t text-right">
                <button v-on:click="upwx(item1.material_id)" v-show="page_params.url_upwx" class="btn btn-default btn-sm">
                    <i class="fa fa-cloud-upload"></i>
                    上传
                </button>
                <a class="btn btn-default btn-sm" v-show="page_params.url_edit" :href="page_params.url_edit + '?materialId=' + item1.material_id">
                    <i class="fa fa-pencil"></i>
                    编辑
                </a>
                <button v-on:click="del(item1.material_id)" v-show="page_params.url_del" class="btn btn-default btn-sm">
                    <i class="fa fa-trash"></i>
                    删除
                </button>
            </div>
        </div>
    </material-preview>
</template>

<script>
    import MaterialPreview from "./MaterialPreview";
    export default {
        name: "MaterialEditing",
        components: {MaterialPreview}
    }
</script>

<style scoped>

</style>